﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Web;
using System.Web.Security;
using Htss.Platform.Web;

namespace DreamBox.Web.Box
{
    public class uBox:ControllerBox
    {

        public ActionResult Load()
        {
            int p = Request.QueryString["p"] != null ? Htss.Platform.Core.Transform.GetInt(Request.QueryString["p"], 1) : 1;
            //
            DAL.Posts.Reply posts = new DAL.Posts.Reply();
            //
            DAL.GetPager page = new DAL.GetPager();
            page.PageSize = 20;
            //条件判断
            string where = "";
            string fldName = "UserID";
            string t = Request.QueryString["t"] == null ? "default" : Request.QueryString["t"];
            switch (t)
            {
                case "default":
                    where = "";
                    break;
                case "location":
                    where = "Location='" + Session["Location"] + "'";
                    break;
            }
            ViewDbTable["ListData"] = page.GetPageData(p, "dbox_v_userinfo", fldName, where, 1);
            ViewData["ListPage"] = page.GetPage(p, where, "dbox_v_userinfo", fldName, "/user" + (t == "default" ? "" : "?t=" + t))[0];
            return View("user");
        }
    }
}
